package cn.joeg.springbootrabbitmq.provider;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author Joeg
 * @email 840459673@qq.com
 * @date 2019/7/19
 */

@Component
public class MyProvider {

    @Autowired
    AmqpTemplate amqpTemplate;

    public void send() {
        // 发送4条消息
        amqpTemplate.convertAndSend("TOPIC_EXCHANGE", "hello.gupao.world", 1024);

    }
}
